#ifndef DBROWSER_H
#define DBROWSER_H

#include <QWidget>
#include <QVBoxLayout>
#include <QShortcut>
#include <QKeySequence>
#include "browserbuttons.h"
#include "filebrowser.h"
#include "contextmenu.h"

class DBrowser : public QWidget
{
    Q_OBJECT
public:
    explicit DBrowser(QString homedir ="", QWidget *parent = 0);
    FileBrowser *fBrowser;
    BrowserButtons *bButtons;
    QFileSystemModel *getDirModel();

private:
    QAction *iconViewMode;
    QAction *listViewMode;
    QAction *detailViewMode;
    ContextMenu *contextMenu;
    QVBoxLayout *layout;
    QString styles; //Name of the style sheet
    QLabel *lblLocation;

signals:
    void exit();
    void maximize();
    void mapReady(QMap <qint64, int>*map);
public slots:
    void exitRequested();    
    void maximizeRequested();
    void changeViewRequested(QAction * view);
    void changeView();
    void setItemWidget(QString, QWidget *);
    void setOverlayStatus(QString path, int status=ListViewDelegate::FileModified);
    void removeOverlayStatus(QString path);

    void addToolButtonButton(QToolButton *btn);
    //void addToolButtonSeparator(QToolButton);
    //void removeFromToolButton(QToolButton *btn);

    void addContextMenuAction(QAction *action);
    void addContextMenuMenu(QMenu *menu);
    void addContextMenuSeparator();
    void removeFromContextMenu(int index);
    /*void setContextMenuActionEnabled(QAction *action, bool enable);
    void setContextMenuActionVisible(QAction *action, bool enable);
    */
};

#endif // DBROWSER_H
